/**
 * 主配置文件
 * 管理所有环境变量和应用配置
 */
require('dotenv').config();

const config = {
  // 服务器配置
  server: {
    port: process.env.PORT || 3001,
    host: process.env.HOST || 'localhost',
    env: process.env.NODE_ENV || 'development'
  },

  // 通义千问配置
  qwen: {
    apiKey: process.env.QWEN_API_KEY,
    baseURL: process.env.QWEN_BASE_URL,
    model: process.env.QWEN_MODEL || 'qwen-plus'
  },

  // MCP工具配置
  mcp: {
    enabled: process.env.MCP_ENABLED === 'true' || true,
    tools: {
      '12306': {
        name: '12306-mcp',
        url: process.env.MCP_12306_URL,
        type: 'streamable_http'
      },
      'amap': {
        name: 'amap-maps',
        url: process.env.MCP_AMAP_URL,
        type: 'streamable_http'
      },
      'weather': {
        name: 'MCP_WEATHER_MCP_Agent_Challenge',
        url: process.env.MCP_WEATHER_URL,
        type: 'streamable_http'
      },
      'time': {
        name: 'time-mcp',
        url: process.env.MCP_TIME_URL,
        type: 'streamable_http'
      }
    }
  }
};

module.exports = config;